package com.weishaoying.mongo.dao;

import com.weishaoying.mongo.entity.UserEntity;

import java.util.List;

interface UserDao {

    void saveUser(UserEntity user);

    UserEntity queryUserByUserName(String userName);

    int updateUser(UserEntity user);

    int batchUpdate(List<Long> idList, String username);

    void deleteUserById(Long id);


    //分页查询
    List<UserEntity> pageQuery(String name, int pageSize, int pageNo);

    //查询名字不为空的
    List<UserEntity> queryNameNotEmpty();

    //查询年龄是age1或者age2的
    List<UserEntity> queryByAge(int age1, int age2, int age3);

    // &&
    List<UserEntity> queryByNameAndAge(String name, Integer age);


}